class Cat:
    def __init__(self, name, age):
        self.name = name
        self.age = age
    def infor(self):
        print(f"我是一只猫,我的名字是{self.name},年龄是{self.age}")
    def shout(self):
        print("喵喵喵~")

class Dog:
    def __init__(self, name, age):
        self.name = name
        self.age = age
    def infor(self):
        print(f"我是一只狗,我的名字是{self.name},年龄是{self.age}")
    def shout(self):
        print("汪汪汪~")

class Pig:
    def __init__(self, name, age):
        self.name = name
        self.age = age
    def infor(self):
        print(f"我是一只猪,我的名字是{self.name},年龄是{self.age}")
    def shout(self):
        print("哼哼哼~")

def Animal(data):
    data.infor()
    data.shout()

cat = Cat("小花", 3)
dog = Dog("冰淇淋", 2)
pig = Pig("大白", 1)
Animal(cat)
Animal(dog)
Animal(pig)
